//
//  CoinCell.swift
//  Exam-iOS
//
//  Created by 李胜锋 on 2018/3/13.
//  Copyright © 2018年 李胜锋. All rights reserved.
//

import Foundation
import UIKit

class CoinCell: UITableViewCell {
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var priceBtn: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        priceBtn.layer.cornerRadius = 5
        priceBtn.layer.borderWidth = 0.5
        priceBtn.layer.borderColor = UIColor.init(red: 247 / 255.0, green: 197 / 255.0, blue: 128 / 255.0, alpha: 1).cgColor
    }
    
    func set(title:String?, price: Int?) {
        titleLabel.text = title
        if price != nil {
            priceBtn.setTitle("￥ \(price ?? 0)" , for: .normal)
        }
    }
}
